package com.arpa.wms.domain.enums;

import cn.hutool.core.util.StrUtil;

import java.util.HashMap;
import java.util.Map;

/**
 * erp类型枚举
 * @author
 */
public enum ErpTypeEnum {
    /**
     * 万里牛
     */
    WAN_LI_NIU("WANLINIU","万里牛"),

    /**
     * 聚水潭
     */
    JU_SHUI_TAN("JUSHUITAN","聚水潭"),
    /**
     * 旺店通
     */
    WANG_DIAN_TONG("WANGDIANTONG","旺店通"),

    /**
     * 优易
     */
    YOU_YI("YOUYI","优易"),
    /**
     * 网店管家
     */
    WANG_DIAN_GUAN_JIA("WANGDIANGUANJIA","网店管家"),
    /**
     * 吉客云
     */
    JI_KE_YUN("JIKEYUN","吉客云");

    /**
     * 值
     */
    private String value;

    /**
     * 描述
     */
    private String desc;

    ErpTypeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }


    public String getDesc() {
        return desc;
    }

    public static String translate(String value){
        ErpTypeEnum item = ENUM_MAP.get(value);
        if(item != null){
            return item.getDesc();
        }
        return StrUtil.EMPTY;
    }

    private static final Map<String, ErpTypeEnum> ENUM_MAP = new HashMap();

    static {
        for(ErpTypeEnum item: values()){
            ENUM_MAP.put(item.getValue(), item);
        }
    }




}
